<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
  <script>
    Function.prototype.call = function (context, ...args) {
      var context = context || windows;
      context.fn = this;
      var result = eval('context.fn(...args)');
      delete context.fn;
      return result;
    };
    Function.prototype.apply = function (context, args) {
      let context = context || window;
      context.fn = this;
      let result = eval('context.fn(...args');
      delete context.fn;
      return result;
    };

    Function.prototype.bind = function (conetxt, ...args) {
      if (typeof this !== 'function') {
        throw new Error('this must be a function');
      }
      var self = this;
      var fbound = function () {
        self.apply(
          this instanceof self ? this : context,
          args.concat(Array.prototype.slice.call(arguments))
        );
      };
      if (this.prototype) {
        fbound.prototype = Object.create(this.prototype);
      }
      return fbound;
    };
  </script>
</html>
